/*******************************************************************************
 * Copyright (c) 2005, 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/**
 * 
 */
package us.gaaoc.framework.dao;

import org.hibernate.Query;

import us.gaaoc.framework.model.CaseRecordStatus;
import us.gaaoc.framework.model.CaseRecordType;

/**
 * 
 * @author hea
 * @date Apr 17, 2006
 * @version: GAJE 1.5
 * 
 */
public class CaseRecordTypeDAOHibernate
		extends
		GenericHibernateDAO<CaseRecordType, Integer, CaseRecordTypeDAOHibernate>
		implements CaseRecordTypeDAO {

	protected CaseRecordTypeDAOHibernate() {

	}

	public CaseRecordType findCaseRecordTypeByCode(int code) {
		LOG.info("Inside the findCaseRecorType in the CaseRecordTypeDAOHibernate....");
		Query q = this.getSession().createQuery("from CaseRecordType crt where crt.code = ? ");       
        q.setInteger(0, code);
        return (CaseRecordType)q.uniqueResult();
	}

}
